﻿
namespace MyFloridaHouse.libSvOpenDistricts.ViewModel
{
    // note: this event and associated listener in the VIEW  could be replaced by pure XAML if 
    // we used VIEW-MODEL notifications for VIEW triggers as explained in http://www.nikhilk.net/View-ViewModel-Interaction.aspx
    // would require use of the SilverlightFX library which isn't yet available for silverlight 4.0

    //public delegate void RequestIsolatedStorageEventHandler(RequestIsolatedStorageEventHandlerArgs e);

    //public class RequestIsolatedStorageEventHandlerArgs
    //{
    //    public string fileDirectory;
    //    public string fileName;
    //    public byte[] fileData;


    //    public RequestIsolatedStorageEventHandlerArgs(string fileDirectory, string fileName, byte[] fileData)
    //    {
    //        this.fileDirectory = fileDirectory;
    //        this.fileName = fileName;
    //        this.fileData = fileData;
    //    }
    //}

    //public partial class ViewModelBase
    //{
    //    public static event RequestIsolatedStorageEventHandler RequestIsolatedStorageEvent;

    //    public static void RaiseRequestIsolatedStorage(string fileDirectory, string fileName, byte[] fileData)
    //    {
    //        if (RequestIsolatedStorageEvent != null)
    //        {
    //            RequestIsolatedStorageEventHandlerArgs args = new RequestIsolatedStorageEventHandlerArgs(fileDirectory, fileName, fileData);
    //            RequestIsolatedStorageEvent(args);
    //        }
    //    }
    //}
}
